//
//  Modal.swift
//  字典转模型
//
//  Created by chen on 15/3/12.
//  Copyright (c) 2015年 chen. All rights reserved.
//

import UIKit
// 模型中套有模型：



class Person: NSObject {
    var name: String = ""
    var age: Int = 0
    var book: Book = Book()
    var books: [Book]? = nil
    
    
    override class func typeMap() -> [String: String]?{
        
        return ["book": "\(Book.self)", "books":"\(Book.self)"]
    }
    
}

class Student: Person {
    var scool = "学校"
    
}

class Book: NSObject{
    
    var bookName  = "数学书"
    
}